<%--
  Created by IntelliJ IDEA.
  User: Mike
  Date: 2020/10/5
  Time: 22:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>getResource</title>
    <link rel="stylesheet" type="text/css" href="css/admin.css">
</head>
<body>
<h1 align="center">All Resources in Databases</h1>
<table width="100%" border="0" cellspacing="1" cellpadding="4" bgcolor="#cccccc" class="tabtop13" align="center">
    <tr>
        <td class="btbg font-center titfont">Season</td>
        <td class="btbg font-center titfont">Episode</td>
        <td class="btbg font-center titfont">endImageURL</td>
        <td class="btbg font-center titfont">VideoURL</td>
        <td class="btbg font-center titfont">操作</td>
    </tr>
    <!--在EL语句中，引用的变量的首字母必须为小写，否则会报错。-->
    <c:forEach items="${list}" var="resource">
        <tr>
            <td class="btbg font-center titfont">${resource.season}</td>
            <td class="btbg font-center titfont">${resource.episode}</td>
            <td class="btbg font-center titfont">${resource.endImageURL}</td>
            <td class="btbg font-center titfont">${resource.videoURL}</td>
            <td class="btbg font-center titfont">
                <a href="getResource?method=delete&season=${resource.season}&episode=${resource.episode}"><input type="button" value="删除" onclick="alert('删除成功！')"></a>
                <a href="getResource?method=findItem&season=${resource.season}&episode=${resource.episode}"><input type="button" value="修改"></a>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
